Add exporter options and other functionality#63
Merged
nikhilNava merged 13 commits intomainfrom Nov 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds exporter configuration options, sets operation source defaults to SDK, introduces new baggage builder methods for session and channel management, fixes channel/subchannel extraction logic, simplifies conversation ID retrieval, and sets request content as input messages in invoke scope.
Key Changes
- Introduced
Agent365ExporterOptionsclass for centralized exporter configuration with batch processor settings - Operation source now defaults to SDK when not specified in baggage
- Added new
BaggageBuildermethods for session ID/description and channel name/links, with deprecated wrappers for old methods - Simplified conversation ID logic by removing WPX comment and email notification entity handling
- Fixed channel extraction to properly handle
ChannelIdobjects withchannelandsub_channelproperties - Request content is now set as input messages in invoke scope spans
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| test_span_processor.py | Updated tests to verify operation source defaults to SDK and honors baggage values |
| test_invoke_agent_scope.py | Added comprehensive tests for request attributes on spans including source metadata and input messages |
| test_baggage_builder.py | Added tests for new session and channel baggage methods |
| test_agent365.py | Refactored from basic functionality test to comprehensive unittest suite for configuration and exporter options, fixed copyright header |
| utils.py | Added deprecated decorator utility and migrated to newer OpenTelemetry exception attributes |
| trace_processor/util.py | Added new session and operation source constants to common attributes, removed deprecated execution source ID |
| span_processor.py | Implemented operation source defaulting to SDK with baggage override support |
| request.py | Removed unused payload field from Request dataclass |
| operation_source.py | New enum for operation source values (SDK, Gateway, MCPServer) |
| turn_context_baggage.py | Simplified conversation ID extraction, enhanced channel handling for ChannelId objects, removed entity-based logic |
| baggage_builder.py | Added session and channel methods, deprecated old source_metadata methods, updated operation_source to use enum |
| invoke_agent_scope.py | Removed execution source ID, added input messages from request content |
| agent365_exporter_options.py | New configuration class for Agent365Exporter with batch processor settings |
| constants.py | Added SESSION_DESCRIPTION_KEY, removed GEN_AI_EXECUTION_SOURCE_ID_KEY |
| config.py | Integrated Agent365ExporterOptions with backward compatibility for legacy parameters |
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Outdated
Show resolved
Hide resolved
...gents-a365-observability-core/microsoft_agents_a365/observability/core/invoke_agent_scope.py
Outdated
Show resolved
Hide resolved
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Outdated
Show resolved
Hide resolved
...ability-core/microsoft_agents_a365/observability/core/exporters/agent365_exporter_options.py
Outdated
Show resolved
Hide resolved
...ability-core/microsoft_agents_a365/observability/core/exporters/agent365_exporter_options.py
Outdated
Show resolved
Hide resolved
.../microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/config.py
Show resolved
Hide resolved
...servability-core/microsoft_agents_a365/observability/core/middleware/turn_context_baggage.py
Outdated
Show resolved
Hide resolved
.../microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/config.py
Outdated
Show resolved
Hide resolved
.../microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/config.py
Outdated
Show resolved
Hide resolved
...bservability-core/microsoft_agents_a365/observability/core/trace_processor/span_processor.py
Show resolved
Hide resolved
…gents_a365/observability/core/invoke_agent_scope.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…gents_a365/observability/core/middleware/baggage_builder.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…gents_a365/observability/core/exporters/agent365_exporter_options.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…gents_a365/observability/core/exporters/agent365_exporter_options.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
@nikhilNava I've opened a new pull request, #64, to work on those changes. Once the pull request is ready, I'll request review from you. |
…gents_a365/observability/core/config.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
...s/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/utils.py
Outdated
Show resolved
Hide resolved
...ability-core/microsoft_agents_a365/observability/core/exporters/agent365_exporter_options.py
Show resolved
Hide resolved
...servability-core/microsoft_agents_a365/observability/core/middleware/turn_context_baggage.py
Outdated
Show resolved
Hide resolved
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Outdated
Show resolved
Hide resolved
...bservability-core/microsoft_agents_a365/observability/core/trace_processor/span_processor.py
Show resolved
Hide resolved
…gents_a365/observability/core/config.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…gents_a365/observability/core/middleware/baggage_builder.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
@nikhilNava I've opened a new pull request, #65, to work on those changes. Once the pull request is ready, I'll request review from you. |
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Outdated
Show resolved
Hide resolved
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Show resolved
Hide resolved
* Initial plan * Remove redundant condition in _iter_conversation_pairs Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
* Initial plan * Fix copyright header in utils.py to use standard Microsoft format Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
…gents_a365/observability/core/middleware/baggage_builder.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
...65-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py
Show resolved
Hide resolved
juliomenendez
approved these changes
Nov 19, 2025
...ability-core/microsoft_agents_a365/observability/core/exporters/agent365_exporter_options.py
Show resolved
Hide resolved
juliomenendez
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task